{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "9438883b",
   "metadata": {},
   "source": [
    "# 本内容主要包含Python的各种操作"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "37ec19bd",
   "metadata": {},
   "source": [
    "### 一行实现1-100求和"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "efe73914",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "5050"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sum(range(1,101))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4cffec45",
   "metadata": {},
   "source": [
    "### 字典如何删除键和合并两个字典"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "28c7f850",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'id': 1, 'age': 18}\n",
      "{'id': 1, 'age': 18, 'add': 'text'}\n"
     ]
    }
   ],
   "source": [
    "dic = {\"id\":1, \"name\" : \"huxiaogee\",\"age\":18}\n",
    "dic2 = {\"add\":\"text\"}\n",
    "del dic[\"name\"]\n",
    "print(dic)\n",
    "dic.update(dic2)\n",
    "print(dic)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "243fc046",
   "metadata": {},
   "source": [
    "### python实现列表去重的方法"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ca1926f9",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
